package com.zmzncs.shop.module.shop.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zmzncs.shop.module.shop.pojo.shopticket.ShopTicket;
import com.zmzncs.shop.module.shop.pojo.shopticket.ShopTicketDTO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zmzncs.shop.module.shop.pojo.shopticket.ShopTicketSearchForm;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * 商户-优惠券 Mapper 接口
 * </p>
 *
 * @author 高博文
 * @since 2021-05-25
 */
@Repository
@Mapper
public interface ShopTicketMapper extends BaseMapper<ShopTicket> {

      /** 分页 */
      IPage<ShopTicketDTO> list(Page page, @Param("form") ShopTicketSearchForm form);

      /** 详情 */
      ShopTicketDTO getById(Long id);

      /**商户优惠券数量*/
      Integer getCountByShopId(Long shopId);
}
